package com.yjian.common;

/**
 * Created by 许小宝 on 2017/9/27.
 */
public class SDataResult {
    int code;
    Object desc;

    public SDataResult() {

    }

    public SDataResult(int code, Object desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getDesc() {
        return desc;
    }

    public void setDesc(Object desc) {
        this.desc = desc;
    }

    public static SDataResult success(Object desc) {
        return new SDataResult(CodeMap.SUCCESS, desc);
    }

    public static SDataResult fail() {
        return new SDataResult(CodeMap.FAIL, "稍后刷新重试!");
    }
}
